﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 软构第一次作业
{
    public partial class Form3 : Form
    {
        public Form3()
        {
            InitializeComponent();
        }

        private void label2_Click(object sender, EventArgs e)
        {

        }

        private void textBox3_TextChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            string printout = "目前有输出的";
            string q = textBox1.Text;
            string t = textBox2.Text;
            int a = int.Parse(q);
            int b = int.Parse(t);
            demo p = new demo();
            p.getallprime(b, a);
            int changeline = 0;//设置换行标志位
            for(int j = 0; j < p.length(); j++)
            {
                if (changeline == 10)
                {
                    changeline = 0;
                    printout = printout + "\r\n";
                }
                printout = printout + " " + p.primelist[j];
            }
            textBox3.Text = printout;
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {

        }
    }
}
